﻿<p>
This example shows the sorting capability of Telerik Grid for ASP.NET MVC. To enable sorting use the <code>Sortable</code> method.
</p>
<p>
The user can sort by a single column or by multiple columns. To enable multiple column sorting use the <code>SortMode</code> method:
</p>
<pre class="prettyprint">
&lt;%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Sortable(sorting =&gt; sorting
            <em>.SortMode(GridSortMode.MultipleColumn)</em>
        )
 %&gt; 
</pre>

<p>
    The user can specify which columns to be initially sorted using the <code>OrderBy</code> method:
</p>
<pre class="prettyprint">
&lt;%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .Sortable(sorting =&gt; sorting
            <em>.OrderBy(sortOrder => sortOrder.Add(o => o.OrderID).Descending())</em>
        )
 %&gt;    
</pre>
